package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 偏离表 实体类
 * 表名：risk_deviation
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "risk_deviation")
public class RiskDeviation implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键，自增
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 租户ID
     */
    @Column(name = "tenant_id", nullable = false)
    private Long tenantId;
    
    /**
     * 偏离名称
     */
    @Column(name = "deviation_name", nullable = false, length = 10)
    private String deviationName;
    
    /**
     * 是否默认（1: 是, 0: 否）默认的偏离会自动关联所有设备
     * 默认值: 0
     */
    @Column(name = "is_default")
    private Boolean isDefault;
    
    /**
     * 引导词
     */
    @Column(name = "guide_word", length = 255)
    private String guideWord;
    
    /**
     * 参数
     */
    @Column(name = "parameter", length = 255)
    private String parameter;
    
    /**
     * 运行范围
     */
    @Column(name = "operating_range", length = 255)
    private String operatingRange;
    
    /**
     * 工作极限
     */
    @Column(name = "working_limit", length = 255)
    private String workingLimit;
    
    /**
     * 设计极限
     */
    @Column(name = "design_limit", length = 255)
    private String designLimit;
    
    /**
     * 单位
     */
    @Column(name = "unit", length = 50)
    private String unit;
    
    /**
     * 测量位置
     */
    @Column(name = "measurement_location", length = 255)
    private String measurementLocation;
    
    /**
     * 排序号
     * 默认值: 0
     */
    @Column(name = "sort_num")
    private Integer sortNum;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time", length = 20)
    private String createTime;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time", length = 20)
    private String updateTime;
    
    /**
     * 创建人
     */
    @Column(name = "create_by")
    private Long createBy;
    
    /**
     * 更新人
     */
    @Column(name = "update_by")
    private Long updateBy;
    
    /**
     * 逻辑删除标志（0：正常，1：删除）
     * 默认值: 0
     */
    @Column(name = "is_del")
    private Boolean isDel;
    
    @Override
    public String toString() {
        return "RiskDeviation{" +
            "id=" + id +
            ", tenantId=" + tenantId +
            ", deviationName=" + deviationName +
            ", isDefault=" + isDefault +
            ", guideWord=" + guideWord +
            ", parameter=" + parameter +
            ", operatingRange=" + operatingRange +
            ", workingLimit=" + workingLimit +
            ", designLimit=" + designLimit +
            ", unit=" + unit +
            ", measurementLocation=" + measurementLocation +
            ", sortNum=" + sortNum +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", createBy=" + createBy +
            ", updateBy=" + updateBy +
            ", isDel=" + isDel +
        '}';
    }
} 